package cn.kgc.javase.day03;

/**
 * @author 课工场
 * @date 2024/6/27
 * @description   复合运算符的使用
 *  +=  -=  *=  /=    %=
 */
public class Demo03 {

    public static void main(String[] args) {

        int number = 1;
        // 重新给变量赋值
        // number = number+1;
        // number++;
        number+=2;    // number = number+2;
        System.out.println("number = " + number);

        number-=2;  // number = number-2;
        System.out.println("number = " + number);

        number*=2;
        System.out.println("number = " + number);
        number/=2;
        System.out.println("number = " + number);

        number%=2;
        System.out.println("number = " + number);



    }
}
